package com.zhijian.medical.service;

import com.zhijian.medical.entity.dto.ExamWarehouseImportDto;
import com.zhijian.medical.entity.po.ExamWarehouse;
import com.zhijian.medical.entity.vo.request.ExamWarehouseSearchVo;
import com.zhijian.medical.entity.vo.response.ExamWarehouseVo;
import com.zhijian.medical.util.Page;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 考核-题库 业务处理层
 *
 * @author HCG
 * @version 1.0
 * @date 2022-01-16 15:14:10
 */
public interface ExamWarehouseService {

    /**
     * 主键查询
     *
     * @param id
     * @return
     */
    ExamWarehouse selectById(Long id);

    /**
     * 主键查询vo
     *
     * @param id
     * @return
     */
    ExamWarehouseVo selectVoById(Long id);

    /**
     * 按照主键删除
     *
     * @param id
     */
    void deleteById(Long id);

    /**
     * 新增
     *
     * @param examWarehouse
     * @return
     */
    Long insert(ExamWarehouse examWarehouse);

    /**
     * 更改
     *
     * @param examWarehouse
     * @return
     */
    boolean update(ExamWarehouse examWarehouse);

    /**
     * 总数
     *
     * @param examWarehouseSearchVo
     * @return
     */
    Integer count(ExamWarehouseSearchVo examWarehouseSearchVo);

    /**
     * 列表
     *
     * @param examWarehouseSearchVo
     * @return
     */
    List<ExamWarehouseVo> selectList(ExamWarehouseSearchVo examWarehouseSearchVo);

    /**
     * 分页展示
     *
     * @param examWarehouseSearchVo
     * @return
     */
    Page<ExamWarehouseVo> selectPage(ExamWarehouseSearchVo examWarehouseSearchVo);

    /**
     * 题库导入Excel
     *
     * @param userType
     * @param name
     * @param file
     * @return
     */
    boolean importExcel(Byte userType, String name, MultipartFile file);

    /**
     * 导出
     *
     * @param id
     * @param response
     */
    void export(Long id, HttpServletResponse response);

    /**
     * 组装出一个题库的导出dto类
     *
     * @param id
     * @return
     */
    List<ExamWarehouseImportDto> selectImportDtoListById(Long id);
}